<!--
 * @Descripttion:
 * @version:
 * @Author: zhuzm@linkstec.com
 * @Date: 2023-01-09 15:01:06
 * @LastEditors: sueRimn
 * @LastEditTime: 2023-03-09 09:35:42
-->
<template>
  <div class="search-list-manager">
    <div class="list-item" v-for="(item, index) in dataFilter" :key="index">
      <h2 @click="jumpFundcompany(item.detail.company_code)" class="name" v-html="item.detail.company_name_v"></h2>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Array,
      default: () => {
        return [];
      }
    },
    max: {
      type: Number,
      default: Infinity
    }
  },
  computed: {
    dataFilter () {
      if (this.max === Infinity) return this.data;
      return this.data.slice(0, this.max);
    }
  },
  methods: {
    // 查看基金公司
    jumpFundcompany (companycode) {
      this.$router.push({
        path: '/fundresearch/fundcompany',
        query: {
          companycode: companycode
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
@import './common.scss';
.search-list-manager{
  .list-item{
    margin-bottom: 11px;
    display: flex;
    align-items: center;
    .name{
      cursor: pointer;
    }
  }
}
</style>
